const { setToken } = require('../utils/request')

module.exports = (req, res, next) => {//暴露一个方法，入口引入
    const token = req.headers['authorization'];
    token && setToken(token)
    next();
}